Getting and Setting an Ink Object's Transfer Mode
You can use theGXGetInkTransfer
function to retrieve the transfer mode
(as agxTransferMode
structure) of an existing ink object; you can use theGXGetShapeTransfer
function to retrieve the transfer mode of the ink object associated with a particular shape. You can use theGXSetInkTransfer
function
to assign a transfer mode to an ink; you can use theGXSetShapeTransfer
function to assign a transfer mode to the ink object associated with a particular shape.To simply get the transfer mode of an existing ink (referenced here by
myInk
) requires defining a transfer mode structure, then calling GXGetInkTransfer to fill it:
gxTransferMode myInkTransfer; GXGetInkTransfer(myInk, &myInkTransfer);If you want to obtain some part of the ink's transfer mode structure, such as its color space, you could make calls like this:
gxTransferMode myInkTransfer; gxColorSpace myTransferSpace; myTransferSpace = GXGetInkTransfer(myInk, &myInkTransfer)->space;Conversely, to set some portion of an ink's transfer mode structure, such as one of its transfer component structures (in an array here callednewComponents
), you could make these calls:
gxTransferMode myInkTransfer; GXGetInkTransfer(myInk, &myInkTransfer); myInkTransfer.component[2] = newComponents[2]; GXSetInkTransfer(myInk, &myInkTransfer);You can alter a shape's transfer mode type by setting the component mode for one component of its ink's transfer mode. For example, you can change the transfer mode type of the first color component of the shapemyShape
togxMinimumMode
with calls like this:
gxTransferMode myShapeTransfer; GXGetShapeTransfer(myShape &myShapeTransfer); myShapeTransfer.component[0].mode = gxMinimumMode; GXSetShapeTransfer(myShape, &myShapeTransfer);TheGXGetInkTransfer
function is described on page 5-72; theGXGetShapeTransfer
function is described on page 5-74. TheGXSetInkTransfer
function is described on page 5-73; theGXSetShapeTransfer
function is described on page 5-75.Transfer modes and the transfer mode structure are described in the section
"About Transfer Modes" beginning on page 5-11. The next section describes how to
use transfer modes to get particular drawing effects.